package com.central;

import com.central.common.port.PortApplicationEnvironmentPreparedEventListener;
import com.central.log.annotation.EnableLogging;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @author 作者 owen E-mail: 624191343@qq.com
 * @version 创建时间：2018年4月5日 下午19:52:21
 * 类说明
 */

@Configuration
@EnableAsync
@EnableCaching
@EnableLogging
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class BizCronTaskApplication {

    public static void main(String[] args) {
    	
//		固定端口启动
//		SpringApplication.run(BizAppCenterApp.class, args);

        //随机端口启动
        SpringApplication app = new SpringApplication(BizCronTaskApplication.class);
        app.addListeners(new PortApplicationEnvironmentPreparedEventListener());
        app.run(args);
    }
}
